<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0037)http://sunzone.iteye.com/blog/1850531 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" dir="ltr"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <title>C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客</title>
    <meta name="description" content="/* 								第九章   数组   数组：多个相同类型的变量被存储在一片连续的存储单元中；   1、一维数组的定义和多维数组元素的引用： 	定义： 		当数组中的每个元素只带有一个下标时，这样的数组为一维数组； 		格式：类型名  数组名[整型常量表达式] ; int a[10] 	说明：基本的语法同java 		注：在内存中给数组中每个成员开辟一个存储单元。总计大小： 		10*4=40个 ...">
    <meta name="keywords" content="c/c++, 指针, 数组 C 语言初级入门--一维数组和指针">
    <link rel="shortcut icon" href="http://sunzone.iteye.com/images/favicon.ico" type="image/x-icon">
    <link rel="search" type="application/opensearchdescription+xml" href="http://sunzone.iteye.com/open_search.xml" title="ITeye">
    <link href="http://sunzone.iteye.com/rss" rel="alternate" title="Sunzone" type="application/rss+xml">
    <link href="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/blog.css" media="screen" rel="stylesheet" type="text/css">
<link href="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/white.css" media="screen" rel="stylesheet" type="text/css">
    <script type="text/javascript" async="" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/xcam"></script><script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/ca-pub-8990951720398508.js"></script><script type="text/javascript" async="" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/xcam(1)"></script><script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/hm.js"></script><script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/application.js" type="text/javascript"></script>    
    <script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "//hm.baidu.com/hm.js?e19a8b00cf63f716d774540875007664";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>


      <link href="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/SyntaxHighlighter.css" media="screen" rel="stylesheet" type="text/css">
  <script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/shCoreCommon.js" type="text/javascript"></script>
<script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/hotkey.js" type="text/javascript"></script>
  <script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/code_favorites.js" type="text/javascript"></script>
<script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/weiboshare.js" type="text/javascript"></script>

    
  <style type="text/css">.dp-j .annotation { color: #646464; }.dp-j .number { color: #C00000; }</style><script type="text/javascript" charset="utf-8" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/gwdang-notifier-bdext.js"></script></head>
  <body>
    <div id="header">
	      <div id="blog_site_nav">
  <a href="http://www.iteye.com/" class="homepage">首页</a>
  <a href="http://www.iteye.com/news">资讯</a>
  <a href="http://www.iteye.com/magazines">精华</a>
  <a href="http://www.iteye.com/forums">论坛</a>
  <a href="http://www.iteye.com/ask">问答</a>
  <a href="http://www.iteye.com/blogs">博客</a>
  <a href="http://www.iteye.com/blogs/subjects">专栏</a>
  <a href="http://www.iteye.com/groups">群组</a>
  <a href="http://sunzone.iteye.com/blog/1850531#" onclick="return false;" id="msna"><u>更多</u> <small>▼</small></a>
  <div class="quick_menu" style="display:none;">
    <a target="_blank" href="http://job.iteye.com/iteye">知识库</a>
    <a href="http://www.iteye.com/search">搜索</a>
  </div>
</div>

	      <div id="user_nav">
  <span style="color:red;">因系统升级，暂停注册。稍后将全面支持使用CSDN帐号进行注册及登录</span>
  
      <a href="http://sunzone.iteye.com/login" class="welcome" title="登录">您还未登录 !</a>
    <a href="http://sunzone.iteye.com/login">登录</a>
  </div>

	    
    </div>

    <div id="page">
        <div id="branding" class="clearfix" style="overflow: hidden;background: none;padding:0 0 2px;">
          <script type="text/javascript">
            /*Iteye博客内页顶部通栏-960*90，创建于 2016-08-01*/
            var cpro_id = "u2720131";
          </script>
          <script type="text/javascript" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/c.js"></script><div id="BAIDU_SSP__wrapper_u2720131_0"></div>
        </div>
      <div id="branding" class="clearfix">
        <div id="blog_name">
          <h1><a href="http://sunzone.iteye.com/">Sunzone</a></h1>
        </div>
        <div id="fd"></div>
        <div id="blog_navbar">
          <ul>
            <li class="blog_navbar_for"><a href="http://sunzone.iteye.com/"><strong>博客</strong></a></li>
            <li><a href="http://sunzone.iteye.com/weibo">微博</a></li>
            <li><a href="http://sunzone.iteye.com/album">相册</a></li>
            <li><a href="http://sunzone.iteye.com/link">收藏</a></li>
            <li><a href="http://sunzone.iteye.com/blog/guest_book">留言</a></li>
            <li><a href="http://sunzone.iteye.com/blog/profile">关于我</a></li>
          </ul>
    
          <div class="search">
            <form action="http://sunzone.iteye.com/blog/search" method="get">
              <input class="search_text" id="query" name="query" style="margin-left: 10px;width: 110px;" type="text" value="">
              <input class="submit_search" type="submit" value="">
            </form>
          </div> 
          <div id="fd"></div>         
        </div>
      </div>
      
      <div id="content" class="clearfix">
        <div id="main">
          



          


<div class="h-entry" style="display:none">
  <a href="http://sunzone.iteye.com/" class="p-author" target="_blank">1140566087</a>
</div>


<div class="blog_main">
  <div class="blog_title">
    <h3>
      <a href="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客.html">C 语言初级入门--一维数组和指针</a>
      <em class="actions">      </em>
    </h3>
    <ul class="blog_categories"><strong>博客分类：</strong> <li><a href="http://sunzone.iteye.com/category/275430">C/C++</a></li> </ul>
        <div class="news_tag"><a href="http://www.iteye.com/blogs/tag/c%2Fc++">c/c++</a><a href="http://www.iteye.com/blogs/tag/%E6%8C%87%E9%92%88">指针</a><a href="http://www.iteye.com/blogs/tag/%E6%95%B0%E7%BB%84">数组</a></div>
    	  
    	
    	
  		
      </div>

  <div id="blog_content" class="blog_content">
    /*<span style="font-size: medium;"><span style="color: olive;">
<br>								第九章&nbsp;&nbsp; 数组
<br>
<br>&nbsp; 数组：多个相同类型的变量被存储在一片连续的存储单元中；
<br>&nbsp; 1、一维数组的定义和多维数组元素的引用：
<br>	定义：
<br>		当数组中的每个元素只带有一个下标时，这样的数组为一维数组；
<br>		格式：类型名&nbsp; 数组名[整型常量表达式] ; int a[10]
<br>
<br>	说明：基本的语法同java
<br>		注：在内存中给数组中每个成员开辟一个存储单元。总计大小：
<br>		10*4=40个字节。
<br>		
<br>		a、当同时定义多个数组时彼此之间用逗号隔开：double w[22],v[4],u[6];
<br>
<br>
<br>
<br>	2、一维数组的引用：
<br>		格式：数组[下标表达式]&nbsp;&nbsp;&nbsp;&nbsp; 起点：0&nbsp; 上限：长度前一位；
<br>		b、在C语言中规定数组名是一个地址常量，它代表整个数组的首地址。
<br>		例如：int *p;int a[10]; p=a;	或者：p=a(p=&amp;a[0])
<br>
<br>	3、一维数组的初始化：int a[8]={1,2,3,4}; //保持类型是一致的
<br>
<br>&nbsp; 二：一维数组和数组元素的地址：
<br>		前言：定义的数组名可以认为是一个存放地址的指针变量，其中的地址值是
<br>		数组第一个元素的地址，也就是数组所占有一串连续存储单元的起始地址。
<br>		重要的是：这个指针变量中的地址值不可改变，也就是说，不可以给数组重新
<br>		赋值。因此，也可以认为数组名是一个地址常量；
<br>		
<br>		&nbsp; 例如：int a[10],*p; p=a+4;====p=&amp;a[4];
<br>		&nbsp;&nbsp; 
<br>			 再如：for(k=0;k&lt;10;k++){ p=a+k;} 
<br>					在循环中没有改变数组名a中的内同，但是通过表达式，a+k
<br>					逐一给出了a数组中每个元素的地址，使p依次指向a数组中的每一个元素；
<br>
<br>		给数组中每一个元素赋值：
<br>			for(k=0;k&lt;10;k++){
<br>				scanf("%d",a+k);
<br>			&nbsp; }
<br>
<br>		p=a 或 p=&amp;a[0] 表达的意思是一样的，都是指针p指向了数组a的首位值 ；
<br>		p++：先向地址中赋值，然后指针移动；
<br>		、
<br>		
<br>		&nbsp; 总结：表示数组元素s[i]的表达式应当有：
<br>				s[i] *(s+i) *(p+i)	*p[i]--这个前提，指针必须指向首地址；
<br>				当p=s+2 时，p=&amp;a[2]&nbsp;&nbsp;&nbsp; *p[0]就是a[2]的值了；
<br>
<br>&nbsp; 5、函数之间对一维数组和数组元素的引用
<br>	a、数组元素作为实参
<br>		每个数组元素实际上代表内存中的一个存储单元。故和普通变量一样，对应的形参保持类型一致；
<br>		数组元素的值可以传送给该变量，在函数中只能对该变量进行操作，而
<br>		不能直接饮用数组元素 ，更不能在函数中改变对应数组的值；
<br>
<br>	b、数组名作实参
<br>		数组名可以作为实参传送， 当时组名是一个地址值，因此对应的形参就是一个指针变量
<br>		此指针变量的基本类型必须和数组的类型一致；这样就可以通过指针变量
<br>		来引用调用函数中对应的数组元素，从而达到对调用函数中对应的数组元素进行
<br>		操作而改变其中的值；
<br>
<br>		当数组作为实参时，对应的形参除了是指针外，还可以用另外两种形式；
<br>		arrin(int a[]);
<br>		arrant(int a[M]);
<br>
<br>	c、数组元素地址作为实参
<br>		因为是地址值，那么对应的形参也应是基类型的指针变量；
<br>
<br></span></span>
<br>*/
<br><div class="dp-highlighter" id=""><div class="bar"><div class="tools">Java代码 <embed wmode="transparent" src="/javascripts/syntaxhighlighter/clipboard_new.swf" width="14" height="15" flashvars="clipboard=%23include%3Cstdio.h%3E%0A%23define%20M%20100%09%2F%2F%E5%AE%8F%E5%AE%9A%E4%B9%89%20%20%E4%B8%80%E8%88%AC%E5%AE%9A%E4%B9%89%E5%A4%A7%E5%86%99%E5%B8%B8%E9%87%8F%20%0Avoid%20arrout(int%20*%2Cint)%3B%09%09%2F%2F%E5%AE%9A%E4%B9%89%E5%87%BD%E6%95%B0%E9%80%87%E8%AF%B4%E6%98%8E%E9%83%A8%E5%88%86%0Aint%20arrin(int%20*)%3B%0A%23define%20NUM%208%0Avoid%20invert(int%20*%2Cint)%3B%0Avoid%20priout(int%20*%2Cint)%3B%0Amain()%0A%7B%0A%09%2F*%0A%09int%20a%5B10%5D%3B%0A%09int%20i%2C*p%3B%0A%09p%3Da%3B%09%09%2F%2F%E8%A1%A8%E7%A4%BA%E6%8C%87%E9%92%88%E5%90%91%E4%BA%86a%0A%09for(i%3D0%3Bi%3C10%3Bi%2B%2B)%0A%09%7B%0A%09%09%2F%2Fp%2B%2B%20%E7%A7%BB%E5%8A%A8%0A%09%09scanf(%22%25d%5Cn%22%2Cp%2B%2B)%3B%09%2F%2F%E5%B0%86%E8%8E%B7%E5%BE%97%E7%9A%84%E5%80%BC%E6%94%BE%E5%88%B0%E5%9C%B0%E5%9D%80%E9%87%8C%E9%9D%A2%EF%BC%8C%E4%B8%94%E6%8C%87%E9%92%88%E6%8C%87%E5%90%91%E4%BA%86%E6%95%B0%E7%BB%84%EF%BC%9B%0A%09%09printf(%22a%5B%25d%5D%3D%25d%5Cn%22%2Ci%2C*p)%3B%09%2F%2F%E6%AD%A4%E6%97%B6%E6%8C%87%E9%92%88%E7%9A%84%E4%BD%8D%E7%BD%AE%E6%B2%A1%E6%9C%89%E5%8F%91%E7%94%9F%E5%8F%98%E5%8C%96%20%20%E5%8F%AA%E4%BF%9D%E5%AD%98%E4%BA%86%E6%95%B0%E7%BB%84%E9%A6%96%E4%BD%8D%E7%9A%84%E5%80%BC%0A%0A%09%7D%0A%09%0A%09int%20s%5BM%5D%20%2Ck%3B%0A%09k%3Darrin(s)%3B%0A%09arrout(s%2Ck)%3B%0A*%2F%0A%09%2F%2F%E4%B8%80%E7%BB%B4%E6%95%B0%E7%BB%84%E5%BA%94%E7%94%A8%20%20%E9%A2%98%E7%9B%AE%EF%BC%9A%E5%B0%86%E6%95%B0%E7%BB%84%E4%B8%AD%E7%9A%84%E6%95%B0%E6%8C%89%E9%A2%A0%E5%80%92%E7%9A%84%E9%A1%BA%E5%BA%8F%E9%87%8D%E6%96%B0%E5%AD%98%E6%94%BE%EF%BC%8C%0A%09%2F%2F%E6%93%8D%E4%BD%9C%E7%9A%84%E6%97%B6%E5%80%99%E5%8F%AA%E8%83%BD%E5%80%9F%E5%8A%A9%E4%B8%80%E4%B8%AA%E5%AD%98%E5%82%A8%E5%8D%95%E5%85%83%EF%BC%8C%E4%B8%8D%E5%BE%97%E5%8F%A6%E5%A4%96%E5%BC%80%E8%BE%9F%E6%95%B0%E7%BB%84%EF%BC%9B%0A%09int%20a%5BNUM%5D%20%3D%20%7B10%2C21%2C31%2C40%2C50%2C60%2C70%2C80%7D%3B%0A%09print(%22%E8%BE%93%E5%87%BA%E6%95%B0%E7%BB%84%E4%B8%AD%E7%9A%84%E5%86%85%E5%AE%B9%EF%BC%9A%22)%3B%0A%09priout(a%2CNUM)%3B%09%09%2F%2F3%0A%09invert(a%2CNUM)%3B%09%09%2F%2F4%0A%09printf(%22%E8%BE%93%E5%87%BA%E6%95%B0%E7%BB%84%E4%B8%AD%E8%B0%83%E6%8D%A2%E5%90%8E%E7%9A%84%E5%86%85%E5%AE%B9%EF%BC%9A%22)%3B%0A%09priout(a%2CNUM)%3B%0A%7D%0A%2F%2F3%0Avoid%20priout(int%20s%5B%5D%2Cint%20n)%0A%7B%0A%09int%20i%3B%0A%09for(i%3D0%3Bi%3Cn%3Bi%2B%2B)%0A%09%7B%0A%09%09printf(%22%254d%22%2Cs%5Bi%5D)%3B%0A%09%09printf(%22%5Cn%22)%3B%0A%09%7D%0A%7D%0A%0A%2F%2F4%0Avoid%20invert(int%20*a%2Cint%20n)%0A%7B%0A%09int%20i%2Cj%2Ct%3B%0A%09i%3D0%3B%0A%09j%3Dn-1%3B%0A%09while(i%3Cj)%0A%09%7B%0A%09a%5Bi%5D%3Da%5Bj%5D%3B%0A%09%09a%5Bj%5D%20%3D%20t%3B%0A%09%09i%2B%2B%3B%09t%3Da%5Bi%5D%3B%0A%09%09%0A%09%09j--%3B%0A%09%7D%0A%7D%0Aint%20arrin(int%20*a)%0A%7B%0A%09int%20i%2Cx%3B%0A%09i%3D0%3B%0A%09scanf(%22%25d%22%2C%26x)%3B%0A%09while(x%3E%3D0)%0A%09%7B%0A%09%09*(a%2Bi)%3Dx%3B%0A%09%09i%2B%2B%3B%0A%09%09scanf(%22%25d%22%2C%26x)%3B%0A%0A%09%7D%0A%09return%20i%3B%0A%7D%0Avoid%20arrout(int%20*a%2Cint%20n)%0A%7B%0A%09int%20i%3B%0A%09for(i%3D0%3Bi%3Cn%3Bi%2B%2B)%0A%09%7B%0A%09%09printf(((i%2B1)%255%3D%3D0)%3F%22%254d%5Cn%22%3B%22%254d%22%2C*(a%2Bi))%3B%0A%09%09printf(%22%5Cn%22)%3B%0A%09%7D%0A%7D" quality="high" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">&nbsp;<a href="javascript:void()" title="收藏这段代码" onclick="code_favorites_do_favorite(this);return false;"><img class="star" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/icon_star.png" alt="收藏代码"><img class="spinner" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/spinner.gif" style="display:none"></a></div></div><ol start="1" class="dp-j"><li><span><span>#include&lt;stdio.h&gt;&nbsp;&nbsp;</span></span></li><li><span>#define&nbsp;M&nbsp;<span class="number">100</span><span>&nbsp;&nbsp;&nbsp;</span><span class="comment">//宏定义&nbsp;&nbsp;一般定义大写常量&nbsp;</span><span>&nbsp;&nbsp;</span></span></li><li><span><span class="keyword">void</span><span>&nbsp;arrout(</span><span class="keyword">int</span><span>&nbsp;*,</span><span class="keyword">int</span><span>);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">//定义函数逇说明部分</span><span>&nbsp;&nbsp;</span></span></li><li><span><span class="keyword">int</span><span>&nbsp;arrin(</span><span class="keyword">int</span><span>&nbsp;*);&nbsp;&nbsp;</span></span></li><li><span>#define&nbsp;NUM&nbsp;<span class="number">8</span><span>&nbsp;&nbsp;</span></span></li><li><span><span class="keyword">void</span><span>&nbsp;invert(</span><span class="keyword">int</span><span>&nbsp;*,</span><span class="keyword">int</span><span>);&nbsp;&nbsp;</span></span></li><li><span><span class="keyword">void</span><span>&nbsp;priout(</span><span class="keyword">int</span><span>&nbsp;*,</span><span class="keyword">int</span><span>);&nbsp;&nbsp;</span></span></li><li><span>main()&nbsp;&nbsp;</span></li><li><span>{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">/*</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;a[10];</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;i,*p;</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;p=a;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//表示指针向了a</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;for(i=0;i&lt;10;i++)</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;{</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//p++&nbsp;移动</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scanf("%d\n",p++);&nbsp;&nbsp;//将获得的值放到地址里面，且指针指向了数组；</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("a[%d]=%d\n",i,*p);&nbsp;&nbsp;//此时指针的位置没有发生变化&nbsp;&nbsp;只保存了数组首位的值</span>&nbsp;</span></li><li><span><span class="comment"></span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;}</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;s[M]&nbsp;,k;</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;k=arrin(s);</span>&nbsp;</span></li><li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;arrout(s,k);</span>&nbsp;</span></li><li><span><span class="comment">*/</span><span>&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//一维数组应用&nbsp;&nbsp;题目：将数组中的数按颠倒的顺序重新存放，</span><span>&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//操作的时候只能借助一个存储单元，不得另外开辟数组；</span><span>&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;a[NUM]&nbsp;=&nbsp;{</span><span class="number">10</span><span>,</span><span class="number">21</span><span>,</span><span class="number">31</span><span>,</span><span class="number">40</span><span>,</span><span class="number">50</span><span>,</span><span class="number">60</span><span>,</span><span class="number">70</span><span>,</span><span class="number">80</span><span>};&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;print(<span class="string">"输出数组中的内容："</span><span>);&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;priout(a,NUM);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//3</span><span>&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;invert(a,NUM);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//4</span><span>&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;printf(<span class="string">"输出数组中调换后的内容："</span><span>);&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;priout(a,NUM);&nbsp;&nbsp;</span></li><li><span>}&nbsp;&nbsp;</span></li><li><span><span class="comment">//3</span><span>&nbsp;&nbsp;</span></span></li><li><span><span class="keyword">void</span><span>&nbsp;priout(</span><span class="keyword">int</span><span>&nbsp;s[],</span><span class="keyword">int</span><span>&nbsp;n)&nbsp;&nbsp;</span></span></li><li><span>{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;i;&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">for</span><span>(i=</span><span class="number">0</span><span>;i&lt;n;i++)&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(<span class="string">"%4d"</span><span>,s[i]);&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(<span class="string">"\n"</span><span>);&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li><span>}&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;</span></li><li><span><span class="comment">//4</span><span>&nbsp;&nbsp;</span></span></li><li><span><span class="keyword">void</span><span>&nbsp;invert(</span><span class="keyword">int</span><span>&nbsp;*a,</span><span class="keyword">int</span><span>&nbsp;n)&nbsp;&nbsp;</span></span></li><li><span>{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;i,j,t;&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;i=<span class="number">0</span><span>;&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;j=n-<span class="number">1</span><span>;&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">while</span><span>(i&lt;j)&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;a[i]=a[j];&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a[j]&nbsp;=&nbsp;t;&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i++;&nbsp;&nbsp;&nbsp;&nbsp;t=a[i];&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j--;&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li><span>}&nbsp;&nbsp;</span></li><li><span><span class="keyword">int</span><span>&nbsp;arrin(</span><span class="keyword">int</span><span>&nbsp;*a)&nbsp;&nbsp;</span></span></li><li><span>{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;i,x;&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;i=<span class="number">0</span><span>;&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;scanf(<span class="string">"%d"</span><span>,&amp;x);&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">while</span><span>(x&gt;=</span><span class="number">0</span><span>)&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*(a+i)=x;&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i++;&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scanf(<span class="string">"%d"</span><span>,&amp;x);&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">return</span><span>&nbsp;i;&nbsp;&nbsp;</span></span></li><li><span>}&nbsp;&nbsp;</span></li><li><span><span class="keyword">void</span><span>&nbsp;arrout(</span><span class="keyword">int</span><span>&nbsp;*a,</span><span class="keyword">int</span><span>&nbsp;n)&nbsp;&nbsp;</span></span></li><li><span>{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;i;&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">for</span><span>(i=</span><span class="number">0</span><span>;i&lt;n;i++)&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(((i+<span class="number">1</span><span>)%</span><span class="number">5</span><span>==</span><span class="number">0</span><span>)?</span><span class="string">"%4d\n"</span><span>;</span><span class="string">"%4d"</span><span>,*(a+i));&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(<span class="string">"\n"</span><span>);&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li><span>}&nbsp;&nbsp;</span></li></ol></div><pre class="java" name="code" codeable_id="" codeable_type="BlogComment" source_url="http://sunzone.iteye.com/blog/1850531#" pre_index="0" title="C 语言初级入门--一维数组和指针" style="display: none;">#include&lt;stdio.h&gt;
#define M 100	//宏定义  一般定义大写常量 
void arrout(int *,int);		//定义函数逇说明部分
int arrin(int *);
#define NUM 8
void invert(int *,int);
void priout(int *,int);
main()
{
	/*
	int a[10];
	int i,*p;
	p=a;		//表示指针向了a
	for(i=0;i&lt;10;i++)
	{
		//p++ 移动
		scanf("%d\n",p++);	//将获得的值放到地址里面，且指针指向了数组；
		printf("a[%d]=%d\n",i,*p);	//此时指针的位置没有发生变化  只保存了数组首位的值

	}
	
	int s[M] ,k;
	k=arrin(s);
	arrout(s,k);
*/
	//一维数组应用  题目：将数组中的数按颠倒的顺序重新存放，
	//操作的时候只能借助一个存储单元，不得另外开辟数组；
	int a[NUM] = {10,21,31,40,50,60,70,80};
	print("输出数组中的内容：");
	priout(a,NUM);		//3
	invert(a,NUM);		//4
	printf("输出数组中调换后的内容：");
	priout(a,NUM);
}
//3
void priout(int s[],int n)
{
	int i;
	for(i=0;i&lt;n;i++)
	{
		printf("%4d",s[i]);
		printf("\n");
	}
}

//4
void invert(int *a,int n)
{
	int i,j,t;
	i=0;
	j=n-1;
	while(i&lt;j)
	{
	a[i]=a[j];
		a[j] = t;
		i++;	t=a[i];
		
		j--;
	}
}
int arrin(int *a)
{
	int i,x;
	i=0;
	scanf("%d",&amp;x);
	while(x&gt;=0)
	{
		*(a+i)=x;
		i++;
		scanf("%d",&amp;x);

	}
	return i;
}
void arrout(int *a,int n)
{
	int i;
	for(i=0;i&lt;n;i++)
	{
		printf(((i+1)%5==0)?"%4d\n";"%4d",*(a+i));
		printf("\n");
	}
}</pre>
  </div>

  

  
      <script type="text/javascript"><!--
      google_ad_client = "ca-pub-8990951720398508";
      /* iteye博客内页Banner-728*90 */
      google_ad_slot = "8267689356/1918544322";
      google_ad_width = 728;
      google_ad_height = 90;
      //-->
      </script>
      <script type="text/javascript" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/show_ads.js">
      </script><ins id="aswift_0_expand" style="display:inline-table;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px;background-color:transparent;"><ins id="aswift_0_anchor" style="display:block;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px;background-color:transparent;"><iframe width="728" height="90" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;width:728px;height:90px;"></iframe></ins></ins>
  

  <div id="bottoms" class="clearfix">
    
    <div id="share_weibo">分享到：
      <a data-type="sina" href="javascript:;" title="分享到新浪微博"><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/sina.jpg"></a>
      <a data-type="qq" href="javascript:;" title="分享到腾讯微博"><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/tec.jpg"></a>
    </div>
  </div>

  <div class="blog_nav">
    <div class="pre_next">
      <a href="http://sunzone.iteye.com/blog/1850530" class="next" title="C 语言初级入门--地址和指针">C 语言初级入门--地址和指针</a>
      |
      <a href="http://sunzone.iteye.com/blog/1850532" class="pre" title="C 语言初级入门--二维数组和指针">C 语言初级入门--二维数组和指针</a>
    </div>
  </div>
  <div class="blog_bottom">
    <ul>
      <li>2013-04-21 09:29</li>
      <li>浏览 864</li>
      <li><a href="http://sunzone.iteye.com/blog/1850531#comments">评论(0)</a></li>
      
      
      <li>分类:<a href="http://www.iteye.com/blogs/category/language">编程语言</a></li>      
      <li class="last"><a href="http://www.iteye.com/wiki/blog/1850531" target="_blank" class="more">相关推荐</a></li>
    </ul>    
  </div>
  
		    
		
<div class="boutique-curr-box blog_comment">
	  <div class="boutique-curr clearfix">
	    <h5 class="h3titles">参考知识库</h5>
	    
	    <dl class="dlnewlist">
	    
          <dd><a target="_blank" href="http://lib.csdn.net/base/android"><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/1455589744328_328.jpg" width="58" height="58" alt=""></a></dd>
          <dt>
              <a target="_blank" href="http://lib.csdn.net/base/android" classs="title">Android知识库</a>
              <span>
                 <em>36823</em>&nbsp;&nbsp;关注 <i>|</i> <em>3149</em>&nbsp;&nbsp;收录                  
              </span>
          </dt>
      
	    </dl>
	    
	    <dl class="dlnewlist">
	    
          <dd><a target="_blank" href="http://lib.csdn.net/base/react"><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/1465887837340_340.jpg" width="58" height="58" alt=""></a></dd>
          <dt>
              <a target="_blank" href="http://lib.csdn.net/base/react" classs="title">React知识库</a>
              <span>
                 <em>3305</em>&nbsp;&nbsp;关注 <i>|</i> <em>393</em>&nbsp;&nbsp;收录                  
              </span>
          </dt>
      
	    </dl>
	    
	    <dl class="dlnewlist">
	    
          <dd><a target="_blank" href="http://lib.csdn.net/base/ai"><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/1479972981201_201.jpg" width="58" height="58" alt=""></a></dd>
          <dt>
              <a target="_blank" href="http://lib.csdn.net/base/ai" classs="title">人工智能基础知识库</a>
              <span>
                 <em>15706</em>&nbsp;&nbsp;关注 <i>|</i> <em>208</em>&nbsp;&nbsp;收录                  
              </span>
          </dt>
      
	    </dl>
	    
	    <dl class="dlnewlist">
	    
          <dd><a target="_blank" href="http://lib.csdn.net/base/java"><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/1453701371636_636.jpg" width="58" height="58" alt=""></a></dd>
          <dt>
              <a target="_blank" href="http://lib.csdn.net/base/java" classs="title">Java 知识库</a>
              <span>
                 <em>32811</em>&nbsp;&nbsp;关注 <i>|</i> <em>3748</em>&nbsp;&nbsp;收录                  
              </span>
          </dt>
      
	    </dl>
	    
	  </div>
</div>
 		
      
  <div class="blog_comment">
    <h5>评论</h5>
    <a id="comments" name="comments"></a>
    
    
    
  </div>

  <div class="blog_comment">
    <h5>发表评论</h5>
            <p style="text-align:center; margin-top:30px;margin-bottom:0px;"><a href="http://sunzone.iteye.com/login" style="background-color:white;"> <img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/login_icon.png" style="vertical-align:middle; margin-right: 10px;"></a><a href="http://sunzone.iteye.com/login">  您还没有登录,请您登录后再发表评论 </a></p>
      </div>
</div>


<script type="text/javascript">
  dp.SyntaxHighlighter.HighlightAll('code', true, true);

  $$('#main .blog_content pre[name=code]').each(function(pre, index){ // blog content
    var post_id = 1850531;
    var location = window.location;
    source_url = location.protocol + "//" + location.host + location.pathname + location.search;
    pre.writeAttribute('codeable_id', post_id);
    pre.writeAttribute('codeable_type', "Blog");
    pre.writeAttribute('source_url', source_url);
    pre.writeAttribute('pre_index', index);
    pre.writeAttribute('title', 'C 语言初级入门--一维数组和指针');
  });

  fix_image_size($$('div.blog_content img'), 700);

  function processComment() {
    $$('#main .blog_comment > div').each(function(comment){// comment
      var post_id = comment.id.substr(2);
      $$("#"+comment.id+" pre[name=code]").each(function(pre, index){
        var location = window.location;
        source_url = location.protocol + "//" + location.host + location.pathname + location.search;
        source_url += "#" + comment.id;
        pre.writeAttribute('codeable_id', post_id);
        pre.writeAttribute('codeable_type', "BlogComment");
        pre.writeAttribute('source_url', source_url);
        pre.writeAttribute('pre_index', index);
        pre.writeAttribute('title', 'C 语言初级入门--一维数组和指针');
      });
    });
  }

  function quote_comment(id) {
    new Ajax.Request('/editor/quote', {
      parameters: {'id':id, 'type':'BlogComment'},
      onSuccess:function(response){editor.bbcode_editor.textarea.insertAfterSelection(response.responseText);
        Element.scrollTo(editor.bbcode_editor.textarea.element);}
    });
  }

  code_favorites_init();
  processComment();
  new WeiboShare({share_buttons: $('share_weibo'), img_scope: $('blog_content')});
</script>




        </div>

        <div id="local">
          <div class="local_top"></div>
          <div id="blog_owner">
  <div id="blog_owner_logo"><a href="http://sunzone.iteye.com/"><img alt="1140566087的博客" class="logo" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/20c54d58-5bda-38bb-af30-72de30e07a1a.jpg" title="1140566087的博客: Sunzone" width=""></a></div>
  <div id="blog_owner_name">1140566087</div>
</div>

          <div id="blog_actions">
            <ul>
              <li>浏览: 336545 次</li>
              <li>性别: <img alt="Icon_minigender_1" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/icon_minigender_1.gif" title="男"></li>
              <li>来自: 武汉</li>
              <li><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/offline.gif"></li>
              
            </ul>
          </div>
          <div id="user_visits" class="clearfix">
            <h5>最近访客 <span style="font-weight:normal;font-size:12px;padding-left:30px;"><a href="http://sunzone.iteye.com/blog/user_visits">更多访客&gt;&gt;</a></span></h5>
            
              <div class="user_visit">
                <div class="logo"><a href="http://levy-tao.iteye.com/" target="_blank"><img alt="levy_tao的博客" class="logo" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/user-logo-thumb.gif" title="levy_tao的博客: " width="48px"></a></div>
                <div class="left"><a href="http://levy-tao.iteye.com/" target="_blank" title="levy_tao">levy_tao</a></div>
              </div>
            
              <div class="user_visit">
                <div class="logo"><a href="http://772134515-qq-com.iteye.com/" target="_blank"><img alt="蓝色人生2的博客" class="logo" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/user-logo-thumb.gif" title="蓝色人生2的博客: " width="48px"></a></div>
                <div class="left"><a href="http://772134515-qq-com.iteye.com/" target="_blank" title="蓝色人生2">蓝色人生2</a></div>
              </div>
            
              <div class="user_visit">
                <div class="logo"><a href="http://wgc1348066599.iteye.com/" target="_blank"><img alt="wgc1348066599的博客" class="logo" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/user-logo-thumb.gif" title="wgc1348066599的博客: " width="48px"></a></div>
                <div class="left"><a href="http://wgc1348066599.iteye.com/" target="_blank" title="wgc1348066599">wgc1348066599</a></div>
              </div>
            
              <div class="user_visit">
                <div class="logo"><a href="http://wellkong.iteye.com/" target="_blank"><img alt="wellkong的博客" class="logo" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/user-logo-thumb.gif" title="wellkong的博客: " width="48px"></a></div>
                <div class="left"><a href="http://wellkong.iteye.com/" target="_blank" title="wellkong">wellkong</a></div>
              </div>
            
          </div>

          
            <div>
              <h5>博客专栏</h5>
              

  
  <dl class="series" style="padding-bottom:5px;">
    <dt>
      <a href="http://www.iteye.com/blogs/subjects/StudyForC" target="_blank"><img alt="2c4ae07c-10c2-3bb0-a106-d91fe0a10f37" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/2c4ae07c-10c2-3bb0-a106-d91fe0a10f37.jpg"></a>
    </dt>
    <dd>
    <a href="http://www.iteye.com/blogs/subjects/StudyForC" target="_blank" title="c/c++ 入门笔记">c/c++ 入门笔记</a><br>
      <span class="visited">浏览量：9853</span>
    </dd>
  </dl>
  
  <dl class="series" style="padding-bottom:5px;">
    <dt>
      <a href="http://www.iteye.com/blogs/subjects/Android" target="_blank"><img alt="3161ba8d-c410-3ef9-871c-3e48524c5263" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/3161ba8d-c410-3ef9-871c-3e48524c5263.png"></a>
    </dt>
    <dd>
    <a href="http://www.iteye.com/blogs/subjects/Android" target="_blank" title="Android 学习笔记">Android 学习笔记</a><br>
      <span class="visited">浏览量：208895</span>
    </dd>
  </dl>
  
  <dl class="series" style="padding-bottom:5px;">
    <dt>
      <a href="http://www.iteye.com/blogs/subjects/J2ME" target="_blank"><img alt="Group-logo" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/group-logo.gif"></a>
    </dt>
    <dd>
    <a href="http://www.iteye.com/blogs/subjects/J2ME" target="_blank" title="J2ME 基础学习课程集">J2ME 基础学习课程集</a><br>
      <span class="visited">浏览量：10018</span>
    </dd>
  </dl>
  
  <dl class="series" style="padding-bottom:5px;">
    <dt>
      <a href="http://www.iteye.com/blogs/subjects/sunzone" target="_blank"><img alt="A98a97d4-eb03-3faf-af96-c7c28f709feb" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/a98a97d4-eb03-3faf-af96-c7c28f709feb.png"></a>
    </dt>
    <dd>
    <a href="http://www.iteye.com/blogs/subjects/sunzone" target="_blank" title="Spring 学习过程记录">Spring 学习过程记录...</a><br>
      <span class="visited">浏览量：11883</span>
    </dd>
  </dl>
  


            </div>
          

                      <div id="blog_menu">
              <h5>文章分类</h5>
              <ul>
                <li><a href="http://sunzone.iteye.com/">全部博客 (258)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/269210">Oracle数据库 (22)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/271425">Java语言 (11)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/272871">J2ME (19)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/273733">Struts2 (8)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/273735">interceptor (1)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/274047">java算法 (48)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/275430">C/C++ (12)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/275529">技术 (2)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/275598">病毒防护 (2)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/275703">三层 (1)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/275889">Android (102)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/279247">数据结构 (2)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/282362">SQL Server (2)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/293274">Hibernate (7)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/295645">Spring (9)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/295654">AJAX (1)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/297179">其他 (1)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/297350">jQuery (7)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/300012">XML (1)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/306494">dfg (0)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/314217">jQuery EasyUI (1)</a></li>
                
                  <li><a href="http://sunzone.iteye.com/category/341293">Extjs (1)</a></li>
                
              </ul>
            </div>
            <div id="month_blogs">
              <h5>社区版块</h5>
              <ul>
                <li><a href="http://sunzone.iteye.com/blog/news">我的资讯</a> (0)</li>
                <li>
                  <a href="http://sunzone.iteye.com/blog/post">我的论坛</a> (24)
                </li>
                <li><a href="http://sunzone.iteye.com/blog/answered_problems">我的问答</a> (0)</li>
              </ul>
            </div>
            <div id="month_blogs">
              <h5>存档分类</h5>
              <ul>
                
                  <li><a href="http://sunzone.iteye.com/blog/monthblog/2015-06">2015-06</a> (1)</li>
                
                  <li><a href="http://sunzone.iteye.com/blog/monthblog/2014-05">2014-05</a> (1)</li>
                
                  <li><a href="http://sunzone.iteye.com/blog/monthblog/2014-03">2014-03</a> (19)</li>
                
                <li><a href="http://sunzone.iteye.com/blog/monthblog_more">更多存档...</a></li>
              </ul>
            </div>
            
            

            <div id="guest_books">
              <h5>最新评论</h5>
              <ul>
                
                <li>
                  <a href="http://xiao-android-jun.iteye.com/" target="_blank" title="xiao_android_jun">xiao_android_jun</a>： 
                  [color=red][&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size=xx-small ...<br>
                  <a href="http://sunzone.iteye.com/blog/1876987#bc2376940">Android 之 进程的概念介绍</a>
                </li>
                
                <li>
                  <a href="http://mingzijian.iteye.com/" target="_blank" title="明子健">明子健</a>： 
                  小伙子，很有前途哦<br>
                  <a href="http://sunzone.iteye.com/blog/1973628#bc2357622">《将博客搬至CSDN》</a>
                </li>
                
                <li>
                  <a href="http://sunzone.iteye.com/" target="_blank" title="1140566087">1140566087</a>： 
                  dugujiujian 写道R.layout.simple_s ...<br>
                  <a href="http://sunzone.iteye.com/blog/1868116#bc2342614">Android 之 下拉(Spinner) 组件示例</a>
                </li>
                
                <li>
                  <a href="http://dugujiujian.iteye.com/" target="_blank" title="dugujiujian">dugujiujian</a>： 
                  R.layout.simple_spinner_dropdow ...<br>
                  <a href="http://sunzone.iteye.com/blog/1868116#bc2341890">Android 之 下拉(Spinner) 组件示例</a>
                </li>
                
                <li>
                  <a href="http://201304122532.iteye.com/" target="_blank" title="泥沙爬虫">泥沙爬虫</a>： 
                  &nbsp;&nbsp;&nbsp;&nbsp;<br>
                  <a href="http://sunzone.iteye.com/blog/1884187#bc2339770">Android 之 Socket套接字的简单应用</a>
                </li>
                
              </ul>
            </div>

            <div class="local_bottom"></div>
          
        </div>
        <div style="margin-top: 10px;float: left;clear: left;">
          <script type="text/javascript">
            /*iteye博客内页左侧Button-200*200，创建于2016-08-01*/
            var cpro_id = "u2720202";
          </script>
          <script type="text/javascript" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/c.js"></script><div id="BAIDU_SSP__wrapper_u2720202_0"></div>
				</div>
      </div>    

      <div id="footer" class="clearfix">
        <div id="copyright">
          <hr>
          声明：ITeye文章版权属于作者，受法律保护。没有作者书面许可不得转载。若作者同意转载，必须以超链接形式标明文章原始出处和作者。<br>
          © 2003-2017 ITeye.com.   All rights reserved.  [ 京ICP证110151号  京公网安备110105010620 ]
        </div>
        <div style="position: fixed;bottom:0px;right:0px;line-height:0px;z-index:1000;">
          <script type="text/javascript"><!--
          google_ad_client = "ca-pub-8990951720398508";
          /* iteye博客内页弹窗-300*250 */
          google_ad_slot = "8267689356/5752063962";
          google_ad_width = 300;
          google_ad_height = 250;
          //-->
          </script>
          <script type="text/javascript" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/show_ads.js">
          </script><ins id="aswift_1_expand" style="display:inline-table;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent;"><ins id="aswift_1_anchor" style="display:block;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent;"><iframe width="300" height="250" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;width:300px;height:250px;"></iframe></ins></ins>
        </div>
      </div>
    </div>
    <script type="text/javascript">
  document.write("<img src='http://stat.iteye.com/?url="+ encodeURIComponent(document.location.href) + "&referrer=" + encodeURIComponent(document.referrer) + "&user_id=' width='0' height='0' />");
</script><img src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/saved_resource" width="0" height="0">

<script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/tracking.js" type="text/javascript"></script>

    
    
    <script language="javascript" type="text/javascript" src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/async_new.js"></script>
<script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/jquery-1.11.1.min.js" type="text/javascript"></script>
<script type="text/javascript">var $csdn_iteye_jq = jQuery.noConflict();// 解决jq与prototype.js命名空间冲突的问题</script>
<script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/tracking(1).js" type="text/javascript"></script>
    
	    
	    <script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/web-storage-cache.min.js" type="text/javascript"></script>
	    <script src="./C 语言初级入门--一维数组和指针 - Sunzone - ITeye博客_files/replace.min.js" type="text/javascript"></script>
    
    
  

<div style="position: static; display: none; width: 0px; height: 0px; border: none; padding: 0px; margin: 0px;"><div id="trans-tooltip"><div id="tip-left-top" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-left-top.png&quot;);"></div><div id="tip-top" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-top.png&quot;) repeat-x;"></div><div id="tip-right-top" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-right-top.png&quot;);"></div><div id="tip-right" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-right.png&quot;) repeat-y;"></div><div id="tip-right-bottom" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-right-bottom.png&quot;);"></div><div id="tip-bottom" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-bottom.png&quot;) repeat-x;"></div><div id="tip-left-bottom" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-left-bottom.png&quot;);"></div><div id="tip-left" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-left.png&quot;);"></div><div id="trans-content"></div></div><div id="tip-arrow-bottom" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-arrow-bottom.png&quot;);"></div><div id="tip-arrow-top" style="background: url(&quot;chrome-extension://ikkepelhgbcgmhhmcmpfkjmchccjblkd/imgs/map/tip-arrow-top.png&quot;);"></div></div><div class="_bd_ext_tip" style="visibility: hidden;"><span class="_bd_ext_search">百度一下</span><span class="_bd_ext_open">打开链接</span><span class="_bd_ext_copy">复制</span></div></body></html>